.class public Les/fy;
.super Ljava/lang/Object;
.source "ImageUtils.java"


# static fields
.field public static a:I

.field public static b:I

.field public static c:I


# direct methods
.method public static a(Landroid/content/Context;F)I
    .locals 1

    .line 47
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p0

    invoke-virtual {p0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object p0

    const/4 v0, 0x1

    .line 48
    invoke-static {v0, p1, p0}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result p0

    float-to-int p0, p0

    return p0
.end method

.method public static a(I)Landroid/graphics/Bitmap;
    .locals 1

    const/high16 v0, 0x437f0000    # 255.0f

    .line 165
    invoke-static {p0, v0, v0, v0, v0}, Les/fy;->a(IFFFF)Landroid/graphics/Bitmap;

    move-result-object p0

    return-object p0
.end method

.method public static a(IFFFF)Landroid/graphics/Bitmap;
    .locals 6

    const/4 v0, 0x0

    .line 156
    :try_start_0
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    invoke-virtual {v1}, Lcom/estrongs/android/pop/FexApplication;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-static {v1, p0}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 157
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result p0

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getConfig()Landroid/graphics/Bitmap$Config;

    move-result-object v2

    invoke-static {p0, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object p0

    .line 158
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, p0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 159
    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    const/16 v3, 0x14

    new-array v3, v3, [F

    const/4 v4, 0x0

    const/high16 v5, 0x43000000    # 128.0f

    div-float/2addr p1, v5

    aput p1, v3, v4

    const/4 p1, 0x1

    const/4 v4, 0x0

    aput v4, v3, p1

    const/4 p1, 0x2

    aput v4, v3, p1

    const/4 p1, 0x3

    aput v4, v3, p1

    const/4 p1, 0x4

    aput v4, v3, p1

    const/4 p1, 0x5

    aput v4, v3, p1

    const/4 p1, 0x6

    div-float/2addr p2, v5

    aput p2, v3, p1

    const/4 p1, 0x7

    aput v4, v3, p1

    const/16 p1, 0x8

    aput v4, v3, p1

    const/16 p1, 0x9

    aput v4, v3, p1

    const/16 p1, 0xa

    aput v4, v3, p1

    const/16 p1, 0xb

    aput v4, v3, p1

    const/16 p1, 0xc

    div-float/2addr p3, v5

    aput p3, v3, p1

    const/16 p1, 0xd

    aput v4, v3, p1

    const/16 p1, 0xe

    aput v4, v3, p1

    const/16 p1, 0xf

    aput v4, v3, p1

    const/16 p1, 0x10

    aput v4, v3, p1

    const/16 p1, 0x11

    aput v4, v3, p1

    const/16 p1, 0x12

    div-float/2addr p4, v5

    aput p4, v3, p1

    const/16 p1, 0x13

    aput v4, v3, p1

    .line 160
    new-instance p1, Landroid/graphics/ColorMatrix;

    invoke-direct {p1}, Landroid/graphics/ColorMatrix;-><init>()V

    .line 161
    invoke-virtual {p1, v3}, Landroid/graphics/ColorMatrix;->set([F)V

    .line 162
    new-instance p1, Landroid/graphics/ColorMatrixColorFilter;

    invoke-direct {p1, v3}, Landroid/graphics/ColorMatrixColorFilter;-><init>([F)V

    invoke-virtual {v2, p1}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;

    .line 163
    invoke-virtual {v1, v0, v4, v4, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p0

    :catch_0
    move-exception p0

    .line 164
    invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V

    return-object v0
.end method

.method public static a(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    .locals 11

    .line 166
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    .line 167
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    .line 168
    div-int/lit8 v2, v1, 0x2

    int-to-float v2, v2

    const/4 v3, 0x0

    if-le v0, v1, :cond_0

    sub-int v4, v0, v1

    .line 169
    div-int/lit8 v4, v4, 0x2

    add-int v5, v4, v1

    move v6, v1

    move v7, v5

    move v5, v2

    const/4 v2, 0x0

    goto :goto_1

    :cond_0
    if-le v1, v0, :cond_1

    sub-int v2, v1, v0

    .line 170
    div-int/lit8 v2, v2, 0x2

    add-int v4, v2, v0

    .line 171
    div-int/lit8 v5, v0, 0x2

    int-to-float v5, v5

    move v7, v0

    move v6, v4

    goto :goto_0

    :cond_1
    move v7, v0

    move v6, v1

    move v5, v2

    const/4 v2, 0x0

    :goto_0
    const/4 v4, 0x0

    .line 172
    :goto_1
    sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v0, v1, v8}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 173
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    const v8, -0xbdbdbe

    .line 174
    new-instance v9, Landroid/graphics/Paint;

    invoke-direct {v9}, Landroid/graphics/Paint;-><init>()V

    .line 175
    new-instance v10, Landroid/graphics/Rect;

    invoke-direct {v10, v4, v2, v7, v6}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 176
    new-instance v2, Landroid/graphics/RectF;

    invoke-direct {v2, v10}, Landroid/graphics/RectF;-><init>(Landroid/graphics/Rect;)V

    const/4 v4, 0x1

    .line 177
    invoke-virtual {v9, v4}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 178
    invoke-virtual {v1, v3, v3, v3, v3}, Landroid/graphics/Canvas;->drawARGB(IIII)V

    .line 179
    invoke-virtual {v9, v8}, Landroid/graphics/Paint;->setColor(I)V

    .line 180
    invoke-virtual {v1, v2, v5, v5, v9}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 181
    new-instance v2, Landroid/graphics/PorterDuffXfermode;

    sget-object v3, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v2, v3}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v9, v2}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;

    .line 182
    invoke-virtual {v1, p0, v10, v10, v9}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    return-object v0
.end method

.method public static a(Landroid/graphics/Bitmap;I)Landroid/graphics/Bitmap;
    .locals 37

    move/from16 v0, p1

    .line 68
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Bitmap;->getConfig()Landroid/graphics/Bitmap$Config;

    move-result-object v1

    const/4 v2, 0x1

    move-object/from16 v3, p0

    invoke-virtual {v3, v1, v2}, Landroid/graphics/Bitmap;->copy(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 69
    invoke-virtual/range {p0 .. p0}, Landroid/graphics/Bitmap;->recycle()V

    if-ge v0, v2, :cond_0

    const/4 v0, 0x0

    return-object v0

    .line 70
    :cond_0
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v11

    .line 71
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v12

    mul-int v13, v11, v12

    .line 72
    new-array v14, v13, [I

    const/4 v5, 0x0

    const/4 v7, 0x0

    const/4 v8, 0x0

    move-object v3, v1

    move-object v4, v14

    move v6, v11

    move v9, v11

    move v10, v12

    .line 73
    invoke-virtual/range {v3 .. v10}, Landroid/graphics/Bitmap;->getPixels([IIIIIII)V

    add-int/lit8 v3, v11, -0x1

    add-int/lit8 v4, v12, -0x1

    add-int v5, v0, v0

    add-int/2addr v5, v2

    .line 74
    new-array v6, v13, [I

    .line 75
    new-array v7, v13, [I

    .line 76
    new-array v8, v13, [I

    .line 77
    invoke-static {v11, v12}, Ljava/lang/Math;->max(II)I

    move-result v9

    new-array v9, v9, [I

    add-int/lit8 v10, v5, 0x1

    shr-int/2addr v10, v2

    mul-int v10, v10, v10

    mul-int/lit16 v13, v10, 0x100

    .line 78
    new-array v15, v13, [I

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v13, :cond_1

    .line 79
    div-int v17, v2, v10

    aput v17, v15, v2

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    const/4 v2, 0x3

    const/4 v10, 0x2

    new-array v13, v10, [I

    const/16 v16, 0x1

    aput v2, v13, v16

    const/4 v2, 0x0

    aput v5, v13, v2

    .line 80
    const-class v2, I

    invoke-static {v2, v13}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, [[I

    add-int/lit8 v13, v0, 0x1

    const/4 v10, 0x0

    const/16 v18, 0x0

    const/16 v19, 0x0

    :goto_1
    if-ge v10, v12, :cond_6

    move-object/from16 v20, v1

    neg-int v1, v0

    move/from16 v29, v12

    const/16 v21, 0x0

    const/16 v22, 0x0

    const/16 v23, 0x0

    const/16 v24, 0x0

    const/16 v25, 0x0

    const/16 v26, 0x0

    const/16 v27, 0x0

    const/16 v28, 0x0

    move v12, v1

    const/4 v1, 0x0

    :goto_2
    const v30, 0xff00

    const/high16 v31, 0xff0000

    if-gt v12, v0, :cond_3

    move/from16 v32, v4

    move-object/from16 v33, v9

    const/4 v4, 0x0

    .line 81
    invoke-static {v12, v4}, Ljava/lang/Math;->max(II)I

    move-result v9

    invoke-static {v3, v9}, Ljava/lang/Math;->min(II)I

    move-result v9

    add-int v9, v18, v9

    aget v9, v14, v9

    add-int v34, v12, v0

    .line 82
    aget-object v34, v2, v34

    and-int v31, v9, v31

    shr-int/lit8 v31, v31, 0x10

    .line 83
    aput v31, v34, v4

    and-int v30, v9, v30

    shr-int/lit8 v30, v30, 0x8

    const/16 v16, 0x1

    .line 84
    aput v30, v34, v16

    and-int/lit16 v9, v9, 0xff

    const/16 v17, 0x2

    .line 85
    aput v9, v34, v17

    .line 86
    invoke-static {v12}, Ljava/lang/Math;->abs(I)I

    move-result v9

    sub-int v9, v13, v9

    .line 87
    aget v30, v34, v4

    mul-int v30, v30, v9

    add-int v1, v1, v30

    .line 88
    aget v30, v34, v16

    mul-int v30, v30, v9

    add-int v21, v21, v30

    .line 89
    aget v30, v34, v17

    mul-int v30, v30, v9

    add-int v22, v22, v30

    if-lez v12, :cond_2

    .line 90
    aget v9, v34, v4

    add-int v26, v26, v9

    .line 91
    aget v9, v34, v16

    add-int v27, v27, v9

    .line 92
    aget v9, v34, v17

    add-int v28, v28, v9

    goto :goto_3

    .line 93
    :cond_2
    aget v9, v34, v4

    add-int v23, v23, v9

    .line 94
    aget v4, v34, v16

    add-int v24, v24, v4

    .line 95
    aget v4, v34, v17

    add-int v25, v25, v4

    :goto_3
    add-int/lit8 v12, v12, 0x1

    move/from16 v4, v32

    move-object/from16 v9, v33

    goto :goto_2

    :cond_3
    move/from16 v32, v4

    move-object/from16 v33, v9

    move v9, v0

    move v4, v1

    const/4 v1, 0x0

    :goto_4
    if-ge v1, v11, :cond_5

    .line 96
    aget v12, v15, v4

    aput v12, v6, v18

    .line 97
    aget v12, v15, v21

    aput v12, v7, v18

    .line 98
    aget v12, v15, v22

    aput v12, v8, v18

    sub-int v4, v4, v23

    sub-int v21, v21, v24

    sub-int v22, v22, v25

    sub-int v12, v9, v0

    add-int/2addr v12, v5

    .line 99
    rem-int/2addr v12, v5

    aget-object v12, v2, v12

    const/16 v34, 0x0

    .line 100
    aget v35, v12, v34

    sub-int v23, v23, v35

    const/16 v16, 0x1

    .line 101
    aget v34, v12, v16

    sub-int v24, v24, v34

    const/16 v17, 0x2

    .line 102
    aget v34, v12, v17

    sub-int v25, v25, v34

    if-nez v10, :cond_4

    add-int v34, v1, v0

    move-object/from16 v35, v15

    add-int/lit8 v15, v34, 0x1

    .line 103
    invoke-static {v15, v3}, Ljava/lang/Math;->min(II)I

    move-result v15

    aput v15, v33, v1

    goto :goto_5

    :cond_4
    move-object/from16 v35, v15

    .line 104
    :goto_5
    aget v15, v33, v1

    add-int v15, v19, v15

    aget v15, v14, v15

    and-int v34, v15, v31

    shr-int/lit8 v34, v34, 0x10

    const/16 v36, 0x0

    .line 105
    aput v34, v12, v36

    and-int v34, v15, v30

    shr-int/lit8 v34, v34, 0x8

    const/16 v16, 0x1

    .line 106
    aput v34, v12, v16

    and-int/lit16 v15, v15, 0xff

    const/16 v17, 0x2

    .line 107
    aput v15, v12, v17

    .line 108
    aget v15, v12, v36

    add-int v26, v26, v15

    .line 109
    aget v15, v12, v16

    add-int v27, v27, v15

    .line 110
    aget v12, v12, v17

    add-int v28, v28, v12

    add-int v4, v4, v26

    add-int v21, v21, v27

    add-int v22, v22, v28

    add-int/lit8 v9, v9, 0x1

    .line 111
    rem-int/2addr v9, v5

    .line 112
    rem-int v12, v9, v5

    aget-object v12, v2, v12

    const/4 v15, 0x0

    .line 113
    aget v34, v12, v15

    add-int v23, v23, v34

    const/16 v16, 0x1

    .line 114
    aget v34, v12, v16

    add-int v24, v24, v34

    const/16 v17, 0x2

    .line 115
    aget v34, v12, v17

    add-int v25, v25, v34

    .line 116
    aget v34, v12, v15

    sub-int v26, v26, v34

    .line 117
    aget v15, v12, v16

    sub-int v27, v27, v15

    .line 118
    aget v12, v12, v17

    sub-int v28, v28, v12

    add-int/lit8 v18, v18, 0x1

    add-int/lit8 v1, v1, 0x1

    move-object/from16 v15, v35

    goto/16 :goto_4

    :cond_5
    move-object/from16 v35, v15

    add-int v19, v19, v11

    add-int/lit8 v10, v10, 0x1

    move-object/from16 v1, v20

    move/from16 v12, v29

    move/from16 v4, v32

    move-object/from16 v9, v33

    goto/16 :goto_1

    :cond_6
    move-object/from16 v20, v1

    move/from16 v32, v4

    move-object/from16 v33, v9

    move/from16 v29, v12

    move-object/from16 v35, v15

    const/4 v1, 0x0

    :goto_6
    if-ge v1, v11, :cond_c

    neg-int v3, v0

    mul-int v4, v3, v11

    move/from16 v22, v5

    move-object/from16 v23, v14

    const/4 v9, 0x0

    const/4 v10, 0x0

    const/4 v12, 0x0

    const/4 v15, 0x0

    const/16 v18, 0x0

    const/16 v19, 0x0

    const/16 v21, 0x0

    move v5, v3

    move v14, v4

    const/4 v3, 0x0

    const/4 v4, 0x0

    :goto_7
    if-gt v5, v0, :cond_9

    move/from16 v24, v11

    const/4 v11, 0x0

    .line 119
    invoke-static {v11, v14}, Ljava/lang/Math;->max(II)I

    move-result v25

    add-int v25, v25, v1

    add-int v26, v5, v0

    .line 120
    aget-object v26, v2, v26

    .line 121
    aget v27, v6, v25

    aput v27, v26, v11

    .line 122
    aget v11, v7, v25

    const/16 v16, 0x1

    aput v11, v26, v16

    .line 123
    aget v11, v8, v25

    const/16 v17, 0x2

    aput v11, v26, v17

    .line 124
    invoke-static {v5}, Ljava/lang/Math;->abs(I)I

    move-result v11

    sub-int v11, v13, v11

    .line 125
    aget v27, v6, v25

    mul-int v27, v27, v11

    add-int v3, v3, v27

    .line 126
    aget v27, v7, v25

    mul-int v27, v27, v11

    add-int v4, v4, v27

    .line 127
    aget v25, v8, v25

    mul-int v25, v25, v11

    add-int v9, v9, v25

    if-lez v5, :cond_7

    const/4 v11, 0x0

    .line 128
    aget v25, v26, v11

    add-int v18, v18, v25

    const/16 v16, 0x1

    .line 129
    aget v25, v26, v16

    add-int v19, v19, v25

    const/16 v17, 0x2

    .line 130
    aget v25, v26, v17

    add-int v21, v21, v25

    goto :goto_8

    :cond_7
    const/4 v11, 0x0

    const/16 v16, 0x1

    const/16 v17, 0x2

    .line 131
    aget v25, v26, v11

    add-int v10, v10, v25

    .line 132
    aget v11, v26, v16

    add-int/2addr v12, v11

    .line 133
    aget v11, v26, v17

    add-int/2addr v15, v11

    :goto_8
    move/from16 v11, v32

    if-ge v5, v11, :cond_8

    add-int v14, v14, v24

    :cond_8
    add-int/lit8 v5, v5, 0x1

    move/from16 v32, v11

    move/from16 v11, v24

    goto :goto_7

    :cond_9
    move/from16 v24, v11

    move/from16 v11, v32

    move/from16 v26, v0

    move/from16 v25, v1

    move v5, v4

    move/from16 v14, v29

    move v4, v3

    const/4 v3, 0x0

    :goto_9
    if-ge v3, v14, :cond_b

    const/high16 v27, -0x1000000

    .line 134
    aget v28, v23, v25

    and-int v27, v28, v27

    aget v28, v35, v4

    shl-int/lit8 v28, v28, 0x10

    or-int v27, v27, v28

    aget v28, v35, v5

    shl-int/lit8 v28, v28, 0x8

    or-int v27, v27, v28

    aget v28, v35, v9

    or-int v27, v27, v28

    aput v27, v23, v25

    sub-int/2addr v4, v10

    sub-int/2addr v5, v12

    sub-int/2addr v9, v15

    sub-int v27, v26, v0

    add-int v27, v27, v22

    .line 135
    rem-int v27, v27, v22

    aget-object v27, v2, v27

    const/16 v28, 0x0

    .line 136
    aget v29, v27, v28

    sub-int v10, v10, v29

    const/16 v16, 0x1

    .line 137
    aget v28, v27, v16

    sub-int v12, v12, v28

    const/16 v17, 0x2

    .line 138
    aget v28, v27, v17

    sub-int v15, v15, v28

    if-nez v1, :cond_a

    add-int v0, v3, v13

    .line 139
    invoke-static {v0, v11}, Ljava/lang/Math;->min(II)I

    move-result v0

    mul-int v0, v0, v24

    aput v0, v33, v3

    .line 140
    :cond_a
    aget v0, v33, v3

    add-int/2addr v0, v1

    .line 141
    aget v28, v6, v0

    const/16 v29, 0x0

    aput v28, v27, v29

    .line 142
    aget v28, v7, v0

    const/16 v16, 0x1

    aput v28, v27, v16

    .line 143
    aget v0, v8, v0

    const/16 v17, 0x2

    aput v0, v27, v17

    .line 144
    aget v0, v27, v29

    add-int v18, v18, v0

    .line 145
    aget v0, v27, v16

    add-int v19, v19, v0

    .line 146
    aget v0, v27, v17

    add-int v21, v21, v0

    add-int v4, v4, v18

    add-int v5, v5, v19

    add-int v9, v9, v21

    add-int/lit8 v26, v26, 0x1

    .line 147
    rem-int v26, v26, v22

    .line 148
    aget-object v0, v2, v26

    const/16 v27, 0x0

    .line 149
    aget v28, v0, v27

    add-int v10, v10, v28

    const/16 v16, 0x1

    .line 150
    aget v28, v0, v16

    add-int v12, v12, v28

    const/16 v17, 0x2

    .line 151
    aget v28, v0, v17

    add-int v15, v15, v28

    .line 152
    aget v28, v0, v27

    sub-int v18, v18, v28

    .line 153
    aget v28, v0, v16

    sub-int v19, v19, v28

    .line 154
    aget v0, v0, v17

    sub-int v21, v21, v0

    add-int v25, v25, v24

    add-int/lit8 v3, v3, 0x1

    move/from16 v0, p1

    goto/16 :goto_9

    :cond_b
    const/16 v16, 0x1

    const/16 v17, 0x2

    const/16 v27, 0x0

    add-int/lit8 v1, v1, 0x1

    move/from16 v0, p1

    move/from16 v32, v11

    move/from16 v29, v14

    move/from16 v5, v22

    move-object/from16 v14, v23

    move/from16 v11, v24

    goto/16 :goto_6

    :cond_c
    move/from16 v24, v11

    move-object/from16 v23, v14

    move/from16 v14, v29

    const/4 v5, 0x0

    const/4 v7, 0x0

    const/4 v8, 0x0

    move-object/from16 v3, v20

    move-object/from16 v4, v23

    move/from16 v6, v24

    move/from16 v9, v24

    move v10, v14

    .line 155
    invoke-virtual/range {v3 .. v10}, Landroid/graphics/Bitmap;->setPixels([IIIIIII)V

    return-object v20
.end method

.method public static a(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    .locals 5

    .line 32
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    .line 33
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    .line 34
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v2

    if-lt v2, v0, :cond_0

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    if-ge v2, v1, :cond_1

    :cond_0
    const/4 v2, 0x1

    .line 35
    invoke-static {p1, v0, v1, v2}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 36
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->recycle()V

    move-object p1, v2

    .line 37
    :cond_1
    new-instance v2, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v2}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 38
    sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v0, v1, v3}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 39
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    const/4 v3, 0x0

    const/4 v4, 0x0

    .line 40
    invoke-virtual {v1, p0, v4, v4, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 41
    invoke-virtual {v1, p1, v4, v4, v3}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 42
    sget-object p0, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 p1, 0x64

    invoke-virtual {v0, p0, p1, v2}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 43
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object p0

    .line 44
    :try_start_0
    invoke-virtual {v2}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 45
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :goto_0
    const/4 p1, 0x0

    .line 46
    array-length v0, p0

    invoke-static {p0, p1, v0}, Landroid/graphics/BitmapFactory;->decodeByteArray([BII)Landroid/graphics/Bitmap;

    move-result-object p0

    return-object p0
.end method

.method public static a(Landroid/graphics/Bitmap;Z)Landroid/graphics/Bitmap;
    .locals 3

    if-nez p0, :cond_0

    const/4 p0, 0x0

    return-object p0

    .line 7
    :cond_0
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result p1

    .line 8
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    .line 9
    sget v1, Les/fy;->a:I

    int-to-float v0, v0

    int-to-float v2, v1

    div-float v2, v0, v2

    int-to-float p1, p1

    int-to-float v1, v1

    div-float v1, p1, v1

    .line 10
    invoke-static {v2, v1}, Ljava/lang/Math;->min(FF)F

    move-result v1

    div-float/2addr p1, v1

    float-to-int p1, p1

    div-float/2addr v0, v1

    float-to-int v0, v0

    const/4 v1, 0x1

    .line 11
    invoke-static {p0, p1, v0, v1}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 12
    invoke-static {p1, v0}, Ljava/lang/Math;->min(II)I

    move-result p1

    const/4 v0, 0x0

    .line 13
    invoke-static {v1, v0, v0, p1, p1}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIII)Landroid/graphics/Bitmap;

    move-result-object p1

    .line 14
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->recycle()V

    .line 15
    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    return-object p1
.end method

.method public static a(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/BitmapDrawable;)Landroid/graphics/Bitmap;
    .locals 5

    .line 24
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v0

    .line 25
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v1

    .line 26
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->getOpacity()I

    move-result v2

    const/4 v3, -0x1

    if-eq v2, v3, :cond_0

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    goto :goto_0

    :cond_0
    sget-object v2, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 27
    :goto_0
    invoke-static {v0, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v2

    .line 28
    new-instance v3, Landroid/graphics/Canvas;

    invoke-direct {v3, v2}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    const/4 v4, 0x0

    .line 29
    invoke-virtual {p0, v4, v4, v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 30
    invoke-virtual {p0, v3}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 31
    invoke-virtual {p1}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object p0

    invoke-static {v2, p0}, Les/fy;->a(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    move-result-object p0

    return-object p0
.end method

.method public static a(Landroid/view/View;)Landroid/graphics/Bitmap;
    .locals 2

    .line 16
    invoke-virtual {p0}, Landroid/view/View;->isDrawingCacheEnabled()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    .line 17
    invoke-virtual {p0, v0}, Landroid/view/View;->setDrawingCacheEnabled(Z)V

    :cond_0
    const/4 v0, 0x0

    .line 18
    :try_start_0
    invoke-virtual {p0, v0}, Landroid/view/View;->setWillNotCacheDrawing(Z)V

    const v0, 0x33f8f8ff

    .line 19
    invoke-virtual {p0, v0}, Landroid/view/View;->setBackgroundColor(I)V

    .line 20
    invoke-virtual {p0}, Landroid/view/View;->destroyDrawingCache()V

    .line 21
    invoke-virtual {p0}, Landroid/view/View;->buildDrawingCache()V

    .line 22
    invoke-virtual {p0}, Landroid/view/View;->getDrawingCache()Landroid/graphics/Bitmap;

    move-result-object p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return-object p0

    :catchall_0
    move-exception p0

    .line 23
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "getViewDrawingCache() catchs "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;

    move-result-object p0

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    const-string v0, "ImageUtils"

    invoke-static {v0, p0}, Lcom/estrongs/android/util/n;->e(Ljava/lang/String;Ljava/lang/String;)V

    const/4 p0, 0x0

    return-object p0
.end method

.method public static a(Ljava/lang/String;)Landroid/graphics/BitmapFactory$Options;
    .locals 2

    .line 57
    :try_start_0
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/estrongs/fs/f;->e(Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object p0

    if-nez p0, :cond_0

    .line 58
    new-instance p0, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {p0}, Landroid/graphics/BitmapFactory$Options;-><init>()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p0

    .line 59
    :cond_0
    new-instance v0, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v0}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    const/4 v1, 0x1

    .line 60
    iput-boolean v1, v0, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    const/4 v1, 0x0

    .line 61
    invoke-static {p0, v1, v0}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 62
    invoke-static {p0}, Lcom/estrongs/fs/util/f;->a(Ljava/io/Closeable;)V

    return-object v0

    .line 63
    :catch_0
    new-instance p0, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {p0}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    return-object p0
.end method

.method public static a(Landroid/graphics/drawable/Drawable;I)Landroid/graphics/drawable/Drawable;
    .locals 0

    if-nez p0, :cond_0

    return-object p0

    .line 65
    :cond_0
    invoke-static {p0}, Landroidx/core/graphics/drawable/DrawableCompat;->wrap(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;

    move-result-object p0

    .line 66
    invoke-virtual {p0}, Landroid/graphics/drawable/Drawable;->mutate()Landroid/graphics/drawable/Drawable;

    .line 67
    invoke-static {p0, p1}, Landroidx/core/graphics/drawable/DrawableCompat;->setTint(Landroid/graphics/drawable/Drawable;I)V

    return-object p0
.end method

.method public static a(Landroid/content/Context;Lcom/estrongs/fs/g;)Ljava/lang/String;
    .locals 1

    const/4 v0, 0x1

    .line 49
    invoke-static {p0, p1, v0}, Les/fy;->a(Landroid/content/Context;Lcom/estrongs/fs/g;Z)Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method public static a(Landroid/content/Context;Lcom/estrongs/fs/g;Z)Ljava/lang/String;
    .locals 2

    .line 50
    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Les/fy;->a(Ljava/lang/String;)Landroid/graphics/BitmapFactory$Options;

    move-result-object p1

    .line 51
    iget v0, p1, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    .line 52
    iget p1, p1, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    if-lez v0, :cond_0

    if-lez p1, :cond_0

    const p2, 0x7f1102db

    .line 53
    invoke-virtual {p0, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p0

    const/4 p2, 0x2

    new-array p2, p2, [Ljava/lang/Object;

    const/4 v1, 0x0

    .line 54
    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    aput-object v0, p2, v1

    const/4 v0, 0x1

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, p2, v0

    .line 55
    invoke-static {p0, p2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    :cond_0
    if-eqz p2, :cond_1

    const p1, 0x7f11090a

    .line 56
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    :cond_1
    const/4 p0, 0x0

    :goto_0
    return-object p0
.end method

.method public static a(Landroid/graphics/Point;)Ljava/lang/String;
    .locals 2

    .line 64
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "("

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v1, p0, Landroid/graphics/Point;->x:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v1, ","

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget p0, p0, Landroid/graphics/Point;->y:I

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p0, ")"

    invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method public static a(Landroid/content/Context;)V
    .locals 1

    .line 1
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p0

    invoke-virtual {p0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object p0

    .line 2
    iget v0, p0, Landroid/util/DisplayMetrics;->widthPixels:I

    sput v0, Les/fy;->b:I

    .line 3
    iget p0, p0, Landroid/util/DisplayMetrics;->heightPixels:I

    sput p0, Les/fy;->c:I

    .line 4
    div-int/lit8 v0, v0, 0x5

    .line 5
    div-int/lit8 v0, p0, 0x5

    int-to-float p0, p0

    const v0, 0x3e4ccccd    # 0.2f

    mul-float p0, p0, v0

    float-to-int p0, p0

    .line 6
    sput p0, Les/fy;->a:I

    return-void
.end method

.method public static b(Landroid/graphics/Bitmap;I)Landroid/graphics/Bitmap;
    .locals 2

    if-nez p0, :cond_0

    const/4 p0, 0x0

    return-object p0

    .line 1
    :cond_0
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    if-ne p1, v0, :cond_1

    return-object p0

    :cond_1
    int-to-float v0, p1

    .line 2
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    int-to-float v1, v1

    div-float/2addr v0, v1

    .line 3
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    int-to-float v1, v1

    mul-float v0, v0, v1

    float-to-int v0, v0

    const/4 v1, 0x1

    .line 4
    invoke-static {p0, p1, v0, v1}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object p0

    return-object p0
.end method

.method public static b(Ljava/lang/String;)Landroid/graphics/Point;
    .locals 4

    .line 5
    new-instance v0, Landroid/graphics/Point;

    invoke-direct {v0}, Landroid/graphics/Point;-><init>()V

    .line 6
    :try_start_0
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    const/4 v2, 0x1

    sub-int/2addr v1, v2

    invoke-virtual {p0, v2, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    const-string v3, ","

    .line 7
    invoke-virtual {v1, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    const/4 v3, 0x0

    .line 8
    aget-object v3, v1, v3

    invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    .line 9
    aget-object v1, v1, v2

    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    .line 10
    invoke-virtual {v0, v3, v1}, Landroid/graphics/Point;->set(II)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object v0

    .line 11
    :catch_0
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Illegal point string : "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method
